<extend name="$_home_public_layout"/>
<block name="main">

    <link rel="stylesheet" type="text/css" href="__ROOT__/Public/dist/css/product.css"/>
    <div class="sub-banner"><img src="__ROOT__/Public/dist/img/product/banner.jpg"></div>
    <div class="container clearfix">
        <div class="cont-l">
            <div class="submenu-title">
                <span class="cn">产品展示</span>
                <span class="en">Product</span>
            </div>
            <div class="submenu-list">
                    <div class="submenu-arrow"></div>
                    <volist name="title" id="v">
                        <div class="submenu-item shuzi" data-shu="{$v.id}"><a href="{:url('',['title'=>$v['title']])}">{$v.title}</a></div>
                    </volist>
            </div>
        </div>
        <div class="cont-r">
            <div class="location clearfix">
                <div class="l-r">
                    <span class="icon"></span><a href="{:url('Home/index/index')}">首页</a>|<a href="{:url('Home/index/product')}">产品展示</a>|<span class="red">{$zhen}</span>
                </div>
                <div class="l-l">
                    <span class="text-t">{$zhen}</span>
                    <span class="text-b">产品展示</span> Product 
                </div>
            </div>
            <div class="product-list">
                <ul class="clearfix">
                    <volist name="list" id="v">
                        <li>
                            <a href="javascript:;">
                                <span class="img"><img src="__ROOT__/Uploads/{$v.icon}"></span>
                                <span class="title">{$v.title}</span>
                                <span class="desc">{$v.main}</span>
                            </a>
                        </li>
                    </volist>
                </ul>
                <div class="pages">
                    {$page}
                </div>
            </div>
        </div>
    </div>
    <script>
        // var str = document.location.href; 
        // var tmparr = str.split("=");
        // a = tmparr[2];
        // // console.log(str);
        // // console.log(a);
        // a = $('.shuzi').attr('data-shu');
        // console.log(a);
        var url = window.location.href;
        // console.log(url);
        var obj = {};
        var reg = /\?/;
        if(url.match(reg)) {
            //判断传入参数，以问号截取，问号后是参数
            var chars = url.split('?')[1];

            //再截&号
            var arr = chars.split('&');

            //获得截取后的数组为键值对字符串
            for (var i = 0; i < arr.length; i++) {

                //保守一点确定看是否为 name=value形式
                var num = arr[i].indexOf("=");

                if (num > 0) {
                    //拼接字符串
                    var name = arr[i].substring(0, num);
                    var value = arr[i].substr(num + 1);

                    //拼接对象，并转码
                    obj[decodeURIComponent(name)] = decodeURIComponent(value);
                }
            }
        }
        str = obj['s'];
        tmparr = str.split("/");
        a = tmparr[4];
        b = a.substring(0,a.length-5);
        div = document.getElementsByClassName('shuzi');
        c = div[0].innerText;
        console.log(b);
        console.log(c);
        for (var i = div.length - 1; i >= 0; i--) {
                
        }
    </script>
</block>